<?php // Do not delete these lines
	if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');
	if (!empty($post->post_password)) { // if there's a password
		if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
			?>
			<p class="nocomments">必须输入密码，才能查看评论！</p>
			<?php
			return;
		}
	}
	/* This variable is for alternating comment background */
	$oddcomment = '';
?>

	<div id="respond">
	<h3>已有<?php echo $post->comment_count.'条评论' ?>，期待您的留言！</h3>
	<div class="cancel-comment-reply">
		<?php cancel_comment_reply_link(); ?>
	</div>
		<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
		<p><?php print '您必须'; ?><a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>"> [ 登录 ] </a>才能发表留言！</p>
	 <?php else : ?>
	 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
		<?php if ( $user_ID ) : ?>
		<p style="margin-bottom:6px;"><?php print '登录者：'; ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>&nbsp;&nbsp;<a href="<?php echo wp_logout_url(get_permalink()); ?>"><?php print '[ 退出 ]'; ?></a></p>
	<?php elseif ( '' != $comment_author ): ?>
	<div class="author"><?php printf(__('欢迎回来 <strong>%s</strong>'), $comment_author); ?>
		<a href="javascript:toggleCommentAuthorInfo();" id="toggle-comment-author-info">[ 更改 ]</a></div>
	<script type="text/javascript" charset="utf-8">
		//<![CDATA[
		var changeMsg = "[ 更改 ]";
		var closeMsg = "[ 隐藏 ]";
		function toggleCommentAuthorInfo() {
			jQuery('.comment-author-info').slideToggle('slow', function(){
				if ( jQuery('.comment-author-info').css('display') == 'none' ) {
				jQuery('#toggle-comment-author-info').text(changeMsg);
				} else {
				jQuery('#toggle-comment-author-info').text(closeMsg);
				}
			});
		}
		jQuery(document).ready(function(){
			jQuery('.comment-author-info').hide();
		});
		//]]>
	</script>
	<?php endif; ?>
	<?php if ( ! $user_ID ): ?>
<div class="comment-author-info">
	<div>
		<label for="author"></label>
<input type="text" name="author" id="author" class="commenttext" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
		昵称<?php if ($req) echo " *"; ?>
	</div>
	<div>
		<label for="email"></label>
		<input type="text" name="email" id="email" class="commenttext" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
		邮箱<?php if ($req) echo " *"; ?>
	</div>
	<div>
		<label for="url"></label>
		<input type="text" name="url" id="url" class="commenttext" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
		网址
	</div>
</div>
		<?php endif; ?>
		<div class="clear"></div>
		<?php if (get_option('ini_editor')) { ?>
<div id="editor_tools">
<div id="editor" class="bd">
<a href="javascript:;" id="comment-smiley">表情</a>
<a href="javascript:SIMPALED.Editor.strong()">粗体</a>
<a href="javascript:SIMPALED.Editor.em()">斜体</a>
<a href="javascript:" id="font-color">颜色</a>
<a href="javascript:SIMPALED.Editor.quote()">引用</a>
<a href="javascript:SIMPALED.Editor.ahref()">链接</a>
<a href="javascript:SIMPALED.Editor.del()">删除线</a>
<a href="javascript:SIMPALED.Editor.underline()">下划线</a>
<a href="javascript:SIMPALED.Editor.img()">插图片</a>
</div>
<div id="smiley"><?php include(TEMPLATEPATH . '/includes/smiley.php'); ?></div>
<div id="fontcolor">
<a href="javascript:SIMPALED.Editor.red()" style="background-color: red"></a>
<a href="javascript:SIMPALED.Editor.green()" style="background-color: green"></a>
<a href="javascript:SIMPALED.Editor.blue()" style="background-color: blue"></a>
<a href="javascript:SIMPALED.Editor.magenta()" style="background-color: magenta"></a>
<a href="javascript:SIMPALED.Editor.yellow()" style="background-color: yellow"></a>
<a href="javascript:SIMPALED.Editor.chocolate()" style="background-color: chocolate"></a>
<a href="javascript:SIMPALED.Editor.black()" style="background-color: black"></a>
<a href="javascript:SIMPALED.Editor.aquamarine()" style="background-color: aquamarine"></a>
<a href="javascript:SIMPALED.Editor.lime()" style="background-color: lime"></a>
<a href="javascript:SIMPALED.Editor.fuchsia()" style="background-color: fuchsia"></a>
<a href="javascript:SIMPALED.Editor.orange()" style="background-color: orange"></a>
<a href="javascript:SIMPALED.Editor.thistle()" style="background-color: thistle"></a>
<a href="javascript:SIMPALED.Editor.brown()" style="background-color: brown"></a>
<a href="javascript:SIMPALED.Editor.peru()" style="background-color: peru"></a>
<a href="javascript:SIMPALED.Editor.deeppink()" style="background-color: deeppink"></a>
<a href="javascript:SIMPALED.Editor.purple()" style="background-color: purple"></a>
<a href="javascript:SIMPALED.Editor.slategray()" style="background-color: slategray"></a>
<a href="javascript:SIMPALED.Editor.tomato()" style="background-color: tomato"></a>
</div>
</div>
		<?php } ?>
		<p><textarea name="comment" id="comment" tabindex="4" cols="50" rows="5"></textarea></p>
		<p>
			<input class="submit" name="submit" type="submit" id="submit" tabindex="5" value="发布 (Ctrl+Enter)" />
			<input class="reset" name="reset" type="reset" id="reset" tabindex="6" value="重写 (Shift+Enter)" />
			<?php comment_id_fields(); ?>
		</p>
		<script type="text/javascript">//Crel+Enter
		//<![CDATA[
			jQuery(document).keypress(function(e){
				if(e.ctrlKey && e.which == 13 || e.which == 10) { 
					jQuery(".submit").click();
					document.body.focus();
				} else if (e.shiftKey && e.which==13 || e.which == 10) {
					jQuery(".reset").click();
				}
			})
		// ]]>
		</script>
		<?php do_action('comment_form', $post->ID); ?>
	 </form>
	<div class="clear"></div>
	 <?php endif; // If registration required and not logged in ?>
  </div>
<?php if ($comments) : ?>
	<ol class="commentlist">
	<?php wp_list_comments('type=comment&callback=metro_comment&end-callback=metro_end_comment&max_depth=23'); ?>
	</ol>
	<div class="navigation">
		<div class="pagination"><?php paginate_comments_links('prev_text=«&next_text=»'); ?></div>
	</div>
 <?php else : // this is displayed if there are no comments so far ?>
	<?php if ('open' == $post->comment_status) : ?>
		<!-- If comments are open, but there are no comments. -->
		<h3 style="padding-top:20px;"><?php echo stripslashes(get_option('ini_cmtinfo'))?></h3>
	 <?php else : // comments are closed ?>
		<!-- If comments are closed. -->
		<h3 style="padding-top:20px;">报歉！评论已关闭！</h3>
	<?php endif; ?>
	<?php endif; ?>